import axios from "../../axios.js"
// 流转客户接口
export default {
  //获取费用
  getAllLIST(data) {
    return axios({
        url: '/reimbursement/list',
        method: 'post',
        data,
    })
   },

    //费用删除
  CHANDELETE(data) {
    return axios({
        url: '/reimbursement/delete',
        method: 'post',
        data,
    })
   },

    //费用编辑
  CHANEDIT(data) {
    return axios({
        url: '/reimbursement/update',
        method: 'post',
        data,
    })
   },

   //费用新增保存
  CHANSAVE(data) {
    return axios({
        url: '/reimbursement/insert',
        method: 'post',
        data,
    })
   },

    //获取客户
  GETAllCUS(data) {
    return axios({
        url: '/reimbursement/selectQdkh',
        method: 'get',
        params:data,
    })
   },

   //获取人
   GETBUMENUSER(data){
    return axios({
      url:'/customerOriginal/selectDepUser',
      method:'get',
      params:data
    })
  },

  //协议号下拉选接口
  selectXyh(data){
    return axios({
      url:'/otherExpenses/selectXyh',
      method:'post',
      data,
    
    })
  },

   //通过协议号和费用类型查询中心，部门，人员
   selectUdc(data){
    return axios({
      url:'/otherExpenses/selectUdc',
      method:'get',
      params:data,
    })
  },


       //获取渠道专员
  GETCHANUSER(data) {
    return axios({
        url: '/reimbursement/selectCmoByDepId',
        method: 'get',
        params:data,
    })
   },

        //获取渠道
  GETCHAN(data) {
    return axios({
        url: '/reimbursement/selectChannelMaintenance',
      method: 'get',
        params:data
    })
   },
  GETCHAN2(data) {
    return axios({
        url: '/reimbursement/selectChannelMaintenance2',
      method: 'get',
        params:data
    })
   },

   //获取费用明细
   GETCHANDETAILS(data) {
    return axios({
        url: '/reimbursement/details',
        method: 'post',
        data,
    })
   },

   //获取费用名称
   GET_selectFeeName(data) {
    return axios({
        url: '/crm/financialCategory/queryAll',
        method: 'get',
        params:data,
    })
   },

    //获取报销单名称
    GET_queryAll(data) {
      return axios({
          url: '/crm/feeName/queryAll',
          method: 'get',
          params:data,
      })
     },

     //费用报销打印详情
     GET_PRINT(data) {
      return axios({
          url: '/reimbursement/dyReimbursementDetails',
          method: 'post',
          data,
      })
     },

  /**==========重写所有费用，待提交费用=============== */
    //  所有费用列表
  getFeeList_Api(data) {
    return axios({
        url: '/reimbursement/reimbursementList',
        method: 'post',
        data,
    })
  },
  // 新增
  addFee_Api(data) {
    return axios({
        url: '/reimbursement/insertReimbursement',
        method: 'post',
        data,
    })
  },
  // 查询登录人所能选择的客户协议号
  getNum(data) {
    return axios({
        url: '/reimbursement/selectSignForAdd',
        method: 'post',
        data,
    })
  },
  // 签单id获取渠道专员
  getChannelPer(data) {
    return axios({
      url: `/reimbursement/selectChannelId?signId=${data.signId}&ownerId=${data.ownerId}`,
      method: 'get'
  })
  },
  // 添加费用明细时通过渠道专员id查询做单渠道
  getChannel(data) {
    return axios({
        url: `reimbursement/selectCostForTreatyNew?channelOwnerId=${data.channelOwnerId}&signId=${data.signId}`,
        method: 'get'
    })
  },
  // 修改
  eidit_Api(data) {
    return axios({
        url: '/reimbursement/update',
        method: 'post',
        data,
    })
  },
  // 详情
  details_Api(data) {
    return axios({
        url: '/reimbursement/detail',
        method: 'post',
        data,
    })
  },
  // 删除
  del_Api(data) {
    return axios({
        url: '/reimbursement/delete',
        method: 'post',
        data,
    })
  },
  // 是否能打印
  isPrint_Api(data) {
    return axios({
        url: `/reimbursement/selectPrintStatus?id=${data.id}&roleId=${data.roleId}`,
        method: 'get'
    })
  },
};
